var express = require('express');
var router = express.Router();
var mongodbClient = require("mongodb").MongoClient;
var mongoUrl = "mongodb://118.89.193.59:27017"
var ObjectID = require("mongodb").ObjectID

/* GET users listing. */
router.get('/', function(req, res, next) {
  
  mongodbClient.connect(mongoUrl, {useNewUrlParser: true}, function (error, db) {
      var database = db.db("test1232323")
      var objArr = Array()
      var queryStr = {}
      
      database.collection("site").find(queryStr).limit(3000).toArray(function (error, respons) {
        res.send(respons);
        db.close()
      })
     
  })
});

module.exports = router;
